/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Monetario;

/**
 *
 * @author Yojugracu
 */

class Filename {



private String fullPath;
private char pathSeparator, extensionSeparator;



protected Filename(String str, char sep, char ext) {
    fullPath = str;
    pathSeparator = sep;
    extensionSeparator = ext;

}


protected String extension() {
    int dot = fullPath.lastIndexOf(extensionSeparator);
return fullPath.substring(dot + 1);
}

protected String filename() { // gets filename without extension
    int dot = fullPath.lastIndexOf(extensionSeparator);
    int sep = fullPath.lastIndexOf(pathSeparator);
return fullPath.substring(sep + 1, dot);

}



protected String path() {
    int sep = fullPath.lastIndexOf(pathSeparator);
return fullPath.substring(0, sep);

}

}
